package cn.cdu.medical.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "处方请求对象")
public class PrescriptionDTO {

    @ApiModelProperty(value = "处方ID")
    private String id;

    @ApiModelProperty(value = "病历ID")
    @NotBlank(message = "病历ID不能为空")
    private String medicalRecordId;

    @ApiModelProperty(value = "患者ID")
    @NotBlank(message = "患者ID不能为空")
    private String patientId;

    @ApiModelProperty(value = "医生ID")
    @NotBlank(message = "医生ID不能为空")
    private String doctorId;

    @ApiModelProperty(value = "处方类型")
    @NotBlank(message = "处方类型不能为空")
    private String prescriptionType;

    @ApiModelProperty(value = "用药说明")
    private String instructions;

    @ApiModelProperty(value = "处方备注")
    private String notes;

    @ApiModelProperty(value = "有效期开始时间")
    @NotNull(message = "有效期开始时间不能为空")
    private Date validityStartTime;

    @ApiModelProperty(value = "有效期结束时间")
    @NotNull(message = "有效期结束时间不能为空")
    private Date validityEndTime;

    @ApiModelProperty(value = "药品列表")
    @NotEmpty(message = "药品列表不能为空")
    private List<PrescriptionDetailDTO> medicines;
} 